Repository navigation
fix(date_to_rfc822): use English day and month names - #974
Open
josefguenther wants to merge 2 commits into
Open
josefguenther wants to merge 2 commits into
josefguenther wants to merge 2 commits into
Conversation
date_to_rfc822 formats %a and %b, which follow the locale option, so with a non-English locale (or none, on a non-English host) it rendered names RFC 822 does not allow, such as "Di, 14 Nov 2023" for de-DE. It now parses the date with the en-US locale. date, date_to_string and date_to_long_string still follow the locale option. Fixes harttle#973 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
There's preserveTimezone feature, we need more test cases to specify how it works with the the new parse/format branch. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Added three |
javi0guerrero4-cloud
approved these changes
Oct 18, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
date_to_rfc822formats with%a, %d %b %Y %H:%M:%S %z, and%aand%bfollow thelocaleoption since #723, so with a non-English locale it renders names RFC 822 doesn't allow. This parses the date withen-USfor that filter only.{{ "2023-11-14T22:13:20Z" | date_to_rfc822 }}withtimezoneOffset: 0:en-USTue, 14 Nov 2023 22:13:20 +0000Tue, 14 Nov 2023 22:13:20 +0000de-DEDi, 14 Nov 2023 22:13:20 +0000Tue, 14 Nov 2023 22:13:20 +0000fr-FRmar., 14 nov. 2023 22:13:20 +0000Tue, 14 Nov 2023 22:13:20 +0000ar-EGالثلاثاء, 14 نوفمبر 2023 22:13:20 +0000Tue, 14 Nov 2023 22:13:20 +0000Di, 14 Nov 2023 22:13:20 +0000Tue, 14 Nov 2023 22:13:20 +0000fr-FR,date_to_long_string14 novembre 202314 novembre 2023date,date_to_stringanddate_to_long_stringstill followlocale.The new test in
test/integration/filters/date.spec.tsfails on master and passes here; the two existingdate_to_rfc822tests now also pass on a de-DE host, where they failed on master.npm run build,npm test(1701 tests) andnpm run lintpass on Node 24.11.1.Fixes #973
Written with AI assistance (Claude Code); I have reviewed the change.